<template>
    <div class="container" v-if="loading1">
        <el-skeleton :rows="27" animated />
    </div>
    <div v-else-if="item.id">
        <SellerData />
        <div class="btn">
            <router-link :to="{
                name : 'SellerListing'
            }">
                去修改卖方挂牌信息
            </router-link>
        </div>
    </div>

    <div class="container" v-else>
        <el-empty description="你貌似还没有进行卖方挂牌哦" />
        <router-link :to="{
            name : 'SellerListing'
        }">
            去进行卖方挂牌
        </router-link>
    </div>

</template>

<script lang="ts" setup>
import { computed } from "vue";
import { loading1, useSellerStore } from "../../../../store/user";
import SellerData from "./component/SellerData.vue";

const item = computed(() => useSellerStore().$state)
</script>

<style lang="less" scoped>
.container {
    width: 50%;
    margin: 0 auto;
    text-align: center;
}

h2 {
    font-weight: 400;
    color: var(--el-color-primary);
}


.btn {
    position: fixed;
    top: 27vh;

    right: 5vw;

    a {
        border: 1px solid currentColor;
        border-radius: 100px;
        padding: 10px 30px;
        display: inline-block;
    }
}
</style>